package com.backend.mapper.rbac;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pojo.entity.UserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserRoleMapper extends BaseMapper<UserRole> {
    List<String> getRolesByUserId(@Param("userId") Long userId);

    Integer deleteByUserId(Long userId);

    Integer addRolesToUser(@Param("userId") Long userId, @Param("roleIds") Long[] roleIds);
}
